package com.hs.telepass.utils;


import android.content.Context;
import android.provider.Settings;
import android.telephony.TelephonyManager;

public class DeviceInfoUtil {
    /**
     * 获得手机imei码
     * */
    public static String getIMEI(Context context){
        TelephonyManager telephonyManager= (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
        return telephonyManager.getDeviceId();
    }

    public static String getDeviceId(Context context) {
        String android_id = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
        return android_id;
    }
}
